{{define "mobile/ordinary/exaResult.html"}}
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <meta name="format-detection" content="telephone=no">
        <title>最新检查结果</title>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/weui.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/example.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/bootstrap.min.css"/>
        <link rel="stylesheet" type="text/css" href="/res/mobile/css/base.css?v=2"/>
        <style type="text/css">
            .weui-grids {
                margin: 20px 10px;
                background: #fff;
                border: 1px solid #bce8f1;
            }

            .weui-grids:after {
                border-color: #d6e9c6;
                border-width: 2px;
            }

            .weui-grids:before {
                border-color: #d6e9c6;
                border-width: 2px;
            }

            .weui-grid:before {
                border-color: #d6e9c6;
                border-width: 2px;
            }

            .weui-grid:after {
                border-color: #d6e9c6;
                border-width: 2px;
            }

            .glyphicon {
                font-size: 18px !important;
            }

            .weui-grid__icon {
                text-align: center;
                padding-top: 6px;
            }

            .weui-tabbar__item span {
                display: inline-block;
                width: 28px;
                height: 28px;
                margin-bottom: 2px;
            }

            .weui-bar__item_on span {
                color: #07C160;
            }

            .weui-grids a:focus, a:hover {
                color: #337ab7;
                text-decoration: none;
            }

            .personal {
                position: relative;
            }

            .button-sp-area {
                position: absolute;
                top: 0px;
                right: 10px;
                border: 1px solid red;
                color: #fff !important;
                border-radius: 5px;
            }

            .button-sp-area a {
                position: unset !important;
            }

            .weui-btn {
                padding: 7px 16px !important;
                width: auto !important;
                color: red !important;
                font-size: 14px !important;
            }
        </style>
    </head>
    <body ontouchstart>
    <div class="header">最新检查结果<span style="color: red;font-weight: bold;" id="latestYear"></span></div>
    <div class="container" id="container">
        <div class="page flex tabbar js_show">
            <div class="page__bd" style="height: 100%;">
                <div class="weui-tab">
                    <div class="weui-tab__panel">
                        <div class="page__bd page__bd_spacing">
                            <div class="personal">个人信息
                                <div class="button-sp-area">
                                    <a id="showDialog" class="weui-btn">退出</a>
                                </div>
                            </div>
                            <div class="_cut"></div>
                            <div class="weui-flex">
                                <div class="weui-flex__item">
                                    <div class="placeholder">姓名：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder" id="baseInfo_UserName"></div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder">性别：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder" id="baseUserInfo_Sex"></div>
                                </div>
                            </div>
                            <div class="weui-flex">
                                <div>
                                    <div class="placeholder">检查时间：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder" id="baseUserInfo_date"></div>
                                </div>
                            </div>
                            <div class="weui-flex">
                                <div>
                                    <div class="placeholder">身份证号：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder" id="baseUserInfo_IdCard"></div>
                                </div>
                            </div>
                            <div class="weui-flex">
                                <div class="">
                                    <div class="placeholder">户籍地址：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder" id="baseUserInfo_Address">></div>
                                </div>
                            </div>
                            <div class="weui-flex">
                                <div class="">
                                    <div class="placeholder">风险等级：</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder p_red" id="baseUserInfo_RiskLevel"></div>
                                </div>
                            </div>
                        </div>
                        <div class="weui-grids">
                            <a href="/mobile/ordinary/baseInfo" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-th-list"></span>
                                </div>
                                <p class="weui-grid__label">基本信息</p>
                            </a>
                            <a href="/mobile/ordinary/lifeStyle" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-home"></span>
                                </div>
                                <p class="weui-grid__label">生活方式</p>
                            </a>
                            <a href="/mobile/ordinary/familyHistory" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-user"></span>
                                </div>
                                <p class="weui-grid__label">家族史</p>
                            </a>
                            <a href="/mobile/ordinary/pastMedicalHistory" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-book"></span>
                                </div>
                                <p class="weui-grid__label">既往病史</p>
                            </a>
                            <a href="/mobile/ordinary/physicalExamination" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-hdd"></span>
                                </div>
                                <p class="weui-grid__label">体格检查</p>
                            </a>
                            <a href="/mobile/ordinary/electrocardiogram" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-heart"></span>
                                </div>
                                <p class="weui-grid__label">心电图</p>
                            </a>
                            <a href="/mobile/ordinary/laboratoryExamination" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-erase"></span>
                                </div>
                                <p class="weui-grid__label">实验室检查</p>
                            </a>
                            <a href="/mobile/ordinary/riskRating" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-compressed"></span>
                                </div>
                                <p class="weui-grid__label">心脑血管风险评级</p>
                            </a>
                            <a href="/mobile/ordinary/cervicalVessels" class="weui-grid">
                                <div class="weui-grid__icon">
                                    <span class="glyphicon glyphicon-dashboard"></span>
                                </div>
                                <p class="weui-grid__label">颈部血管超声</p>
                            </a>
                        </div>
                    </div>
                    <!-- 导航start -->
                    {{template "mobile/ordinary/tabbar.html"}}
                    <!-- 导航end -->
                    <div id="dialogs">
                        <!--BEGIN dialog-->
                        <div class="js_dialog" id="Dialog" style="display: none;">
                            <div class="weui-mask"></div>
                            <div class="weui-dialog weui-skin_android">
                                <div class="weui-dialog__bd">
                                    是否退出？
                                </div>
                                <div class="weui-dialog__ft">
                                    <a id="cancelDialog" class="weui-dialog__btn weui-dialog__btn_default">取消</a>
                                    <a id="signOut" class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
                                </div>
                            </div>
                        </div>
                        <!--END dialog-->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="/res/mobile/js/zepto.min.js"></script>
    <script type="text/javascript" src="/res/mobile/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" src="/res/mobile/js/weui.min.js"></script>
    <!-- <script type="text/javascript" src="/res/mobile/js/example.js"></script> -->
    <script type="text/javascript" src="/res/mobile/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" class="tabbar js_show">
        $(function () {
            //
            var $Dialog = $('#Dialog');
            $('#showDialog').on('click', function () {
                $Dialog.fadeIn(200);
            });
            $('#cancelDialog').on('click', function () {
                $Dialog.fadeOut(200);
            });
            $("#signOut").on('click', function () {
                localStorage.setItem('autoLoginFlag', "F");
                window.location.href = '/mobile/ordinary/signOut'
            })
            //
            $(".weui-tabbar").find("a:eq(0)").addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            //获取用户信息
            $.post("/mobile/ordinary/getUserData", {}, function (r) {
                if (r) {
                    if (r.code != 1) {
                        window.location.href = "/mobile/ordinary/login"
                    } else {
                        var createTime = r.data["createTime"]
                        $("#baseUserInfo_date").text(createTime);
                        var baseInfo = r.data["baseInfo"]
                        var ccRR = r.data["ccRiskRating"]
                        if (baseInfo) {
                            $("#baseInfo_UserName").text(baseInfo.userName);
                            $("#baseUserInfo_Sex").text(baseInfo.userSex);
                            $("#baseUserInfo_IdCard").text(baseInfo.idCard);
                            $("#baseUserInfo_Address").text(baseInfo.address);
                        }
                        if (ccRR) {
                            $("#baseUserInfo_RiskLevel").text(ccRR.risk_level);
                        }
                    }
                } else {
                    window.location.href = "/mobile/ordinary/login"
                }
            })
        });
    </script>

    </body>
    </html>
{{end}}